Document::DoImport
Section: ET++ method description (n)
Updated: automatically Fri Mar 15 14:13:05 1991
Index
Return to Main Contents
NAME
Document::DoImport - instance method
TEMPLATE
importCommand = Command *
DoImport(istream & inputStream, FileType * fileType)
SPECIFIERS
public
virtual
DESCRIPTION
DoImport is called by the method Import and must perform the actual import operation. fileType is the type of the file which has been selected in the import dialog and checked by the method CanImportDocument. The name of the file has been used to create the inputStream. DoImport will normally use the inputStream for reading. But by means of the fileType, which also contains the file name (see class FileType), it is also possible to open and read the file in a different way. DoImport should create and return an undoable command. For example, a document dealing with text would read the text from the file and create a "paste" command with that text.
The default implementation just returns gNoChanges.
Method is sometimes overridden.
ARGUMENTS
- istream & inputStream
-
input stream which to import data from
- FileType * fileType
-
the type of the file from which to import data. fileType has been checked by the method CanImportDocument.
RETURN ARGUMENT
- Command * importCommand
-
an undoable command which will actually insert the imported data into the document
CATEGORIES
input/output, overrider interface
FIRST DEFINITION
class Document
FILES
- implementation:
-
Document.C
Index
- NAME
-
- TEMPLATE
-
- SPECIFIERS
-
- DESCRIPTION
-
- ARGUMENTS
-
- RETURN ARGUMENT
-
- CATEGORIES
-
- FIRST DEFINITION
-
- FILES
-
This document was created by
man2html,
using the manual pages.
Time: 00:40:28 GMT, March 30, 2022